import Vue from "vue"
import VueRouter from "vue-router"
import Wrapper from "@/layout/wrapper.vue"

Vue.use(VueRouter)

const routes = [
  {
    path: "/login",
    name: "Login",
    exact: true,
    component: () => import(/* webpackChunkName: "setting" */ "../views/login.vue"),
  },
  {
    path: "/",
    component: Wrapper,
    exact: true,
    children: [
      {
        path: "",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "about" */ "../views/Home.vue"),
      },
      {
        path: "calculation-power_list",
        name: "calculation-power",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "about" */ "../views/calculation-power"),
      },
      {
        path: "withdrawal-manage/cal",
        name: "Cal",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "about" */ "../views/withdrawal-manage/cal.vue"),
      },
      {
        path: "withdrawal-manage/integral",
        name: "Integral",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "about" */ "../views/withdrawal-manage/integral.vue"),
      },
      {
        path: "deliver_record",
        name: "Deliver",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "about" */ "../views/deliver/deliver_record"),
      },
      {
        path: "wallet",
        name: "wallet",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "wallet" */ "../views/wallet"),
      },
      {
        path: "wallet/check",
        name: "WalletCheck",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "wallet" */ "../views/wallet"),
      },
      {
        path: "profit_record",
        name: "profit_record",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "wallet" */ "../views/wallet/profit_record.vue"),
      },
      {
        path: "users",
        name: "users",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "users" */ "../views/users"),
      },
      {
        path: "users/reward_record",
        name: "RewardRecord",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "users" */ "../views/users/reward_record"),
      },
      {
        path: "users/unmbraller",
        name: "unmbraller",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "users" */ "../views/users/umbraller.vue"),
      },
      {
        path: "setting/record",
        name: "setting",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "setting" */ "../views/setting/record.vue"),
      },
      {
        path: "setting/system",
        name: "System",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "setting" */ "../views/setting/system.vue"),
      },
      {
        path: "setting/announcement",
        name: "Announcement",
        meta: {
          requireAuth: true
        },
        component: () => import(/* webpackChunkName: "setting" */ "../views/setting/announcement.vue"),
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
